package com.yxq.mdt.app.modules.socialcontact.presenter;

import com.yxq.mdt.app.base.BasePresenter;
import com.yxq.mdt.app.modules.socialcontact.bean.GivePresentBean;
import com.yxq.mdt.app.modules.socialcontact.bean.HomeTopicListBean;
import com.yxq.mdt.app.modules.socialcontact.bean.SocialPersonalHomepageBean;
import com.yxq.mdt.app.modules.socialcontact.bean.SocialPersonalMyHomepageBean;
import com.yxq.mdt.app.modules.socialcontact.model.MainSocialContactModel;
import com.yxq.mdt.app.net.ApiModel;

public class MainSocialPersonalDynamicPresenter extends BasePresenter<mainSocialPersonalDynamicContract.View, MainSocialContactModel> implements mainSocialPersonalDynamicContract.Presenter {


    /**
     * 如果当前页面同时需要 Model 层和 View 层,则使用此构造函数(默认)
     *
     * @param rootView
     * @param model
     */
    public MainSocialPersonalDynamicPresenter(mainSocialPersonalDynamicContract.View rootView, MainSocialContactModel model) {
        super(rootView, model);
    }


    @Override
    public void selectTopicInfoListByUserId(int pageNum, String userId, int pageSize) {
        mBaseModel.getSelectTopicInfoListByUserId(pageNum, userId, pageSize, new ApiModel.CommonCallback<HomeTopicListBean>() {
            @Override
            public void onSuccess(HomeTopicListBean homeTopicListBean) {
                mRootView.onLoadSelectTopicInfoListByUserIdSuccess(homeTopicListBean);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadSelectTopicInfoListByUserIdFailed();
            }
        });
    }
}
